package org.elsfs.cloud.common.mybatis.ext.sql.support.condition;


/**
 * 子查询非空条件
 *
 */
public class IsNotNullSubQueryConditionItem extends IsNullSubQueryConditionItem {

    public IsNotNullSubQueryConditionItem(String sql) {
        super(sql);
    }

    /**
     * 构建SQL片段
     *
     * @return SQL片段
     */
    @Override
    public String buildSqlFragment() {
        return String.format(
            "(%s) IS NOT NULL",
            this.sql
        );
    }
}
